package com.xiaomaoguai.simple;

/**
 * @ FileName: ConcreteHandler.java
 * @ Author: WeiHui-Z
 * @ Date: 2017/9/15 15:40
 * @ Version: v1.0.0
 */
public class ConcreteHandler extends Handler {

    /**
     * 处理方法，调用此方法处理请求
     */
    @Override
    public void handleRequest() {
        if (getSuccessor() != null) {
            System.out.println("放过请求，让子责任链处理");
            getSuccessor().handleRequest();
        } else {
            System.out.println("处理请求");
        }
    }
}
